<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div id="content" class="col-lg-10 col-sm-10">
    <!-- content starts -->
    <div>
        <ul class="breadcrumb">
            <li>
                <a href="#">Home</a>
            </li>
            <li>
                <a href="#">View Question</a>
            </li>
        </ul>
    </div>

    <div class="row">
        <div class="box col-md-12">
            <div class="box-inner">
                <form  action="GoStudentFilterAction.do" method="post">

                    <div class="box-header well" data-original-title="">
                        <h2>Filter Criteria</h2>



                    </div>
                    <div class="box-content">
                        <div class="control-group">
                            <div class="controls">
                                <label class="control-label" for="selectError">Select Branch</label>

                                <select id="branch_select" name="branch" data-rel="chosen">
                                    <option value="-1">None</option>
                                    <c:forEach items="${applicationScope.allbranches}" var="branch">
                                        <option value="${branch.id}">${branch.name}</option>    
                                    </c:forEach>

                                </select> 
                                <br><br>
                                <label class="control-label" for="selectError">Select Semester</label>

                                <select id="semester_select" name="semester" data-rel="chosen">
                                    <option value="-1">None</option>
                                    <option>1</option>
                                    <option>2</option>
                                    <option>3</option>
                                    <option>4</option>
                                    <option>5</option>
                                    <option>6</option>
                                    <option>7</option>
                                    <option>8</option>


                                </select> 
                                <br><br>
                                <label class="control-label" for="selectError">Select Division</label>

                                <select id="division_select" name="division" data-rel="chosen">
                                    <option value="-1">None</option>
                                    

                                </select>
                                


                            </div>

                        </div>

                    </div>
                    
                    <p class="center col-md-5">
                        <input type="submit" class="btn btn-primary" value="GO">
                    </p>
                </form>
            </div>

        </div>
    </div>

     <c:forEach var="question" items="${sessionScope.page_li_allquestions}" varStatus="i" >
        
       
        
 <div class="row" id="div_${question.id}">
        <div class="box col-md-12">
            <div class="box-inner">
                <div class="box-header well" data-original-title="" >
                    <h2><i class="glyphicon glyphicon-question-sign"></i> Question ${i.count}</h2>

                    <div class="box-icon">
                          
                 <!--<button class="label-success label label-default add_button" id="add_${question.id}">Add</button>-->
                <a href="EditQuestionAction.do?id=${question.id}"><button class="label-success label label-default">Edit</button></a> 
                <br>
               <button class="label-success label label-default delete_button" id="delete_${question.id}">Delete</button>
                        
                    </div>
                </div>
                <div class="box-content" >
                    
                    <div class="row">
                        <table>
                            <tr><td><h5><strong>Topic :</strong></h5></td><td>${question.topic.name}</td></tr>
                            <tr><td><h5><strong>Question :</strong></h5></td><td>${question.qdescription}</td></tr>
                            <tr><td><h5><strong>Solution :</strong></h5></td><td>${question.solution}</td></tr>
                            <tr><td><h5><strong>Answer :</strong></h5></td><td>${question.answer}</td></tr>
                        </table>
                </div>
                    
                </div>
            </div>
        </div>
        <!--/span-->
    </div>
</c:forEach>
     <ul class="pagination pagination-centered">
                      <c:forEach begin="1" end="${sessionScope.pagelink}" var="i">
                            <li class="active">
                                <!--<a href="ViewTestQuestionAction.do?id=<c:out value="${i}"></c:out>">${i}</a>-->
                                 <a href="PageAction.do?pageid=${i}&action=question">${i}</a> 
                                </li>
                        </c:forEach>
                                </ul>
</div>